<link rel="stylesheet" type="text/css" href="../css/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="../css/themes/icon.css">

<div id="panel-satisfaction-inpatient-dept-pop" data-options="border:false;width:100%">
	<div class="easyui-panel list-panel" data-options="openAnimation:'slide',closeAnimation:'slide'">
	  	<div class="well well-small" style="margin-left: 5px;margin-top: 5px">
			<p>
				<span class="badge">提示</span>
				 <strong><font color="red">双击</font></strong> 记录行, 可以查看住院科室满意度详情
			</p>			
		</div>   
	
		<table class="easyui-datagrid dg-list"  
		data-options="rownumbers:true,
		animate: true,							
		striped:true,
		border:true,
		//singleSelect:false,
		idField: 'id',					
		fitColumns: true,
		checkOnSelect:true,
		selectOnCheck:true,
		width : 'auto',
		pagination : true">
		
		<thead>						
			<tr>				
				<th field="dept_name" width="60" align="center">科室名称</th>	
				<th field="inpatient_out_num" width="40" align="center">出院人数</th>				
				<th field="cnt" width="40" align="center">评价人数</th>
				<th field="fcmy" width="40" align="center"  data-options="
					styler: function(value,row,index){
						if (value > 0){
							return 'color:green;';							
						}
					}
				">非常满意</th>
				<th field="my" width="40" align="center"  data-options="
					styler: function(value,row,index){
						if (value > 0){
							return 'color:green;';							
						}
					}
				">满意</th>
				<th field="jbmy" width="40" align="center"  data-options="
					styler: function(value,row,index){
						if (value > 0){
							return 'color:green;';							
						}
					}
				">基本满意</th>				
				<th field="bmy" width="40" align="center"  data-options="
					styler: function(value,row,index){
						if (value > 0){
							return 'color:red;';							
						}
					}
				">不满意</th>		
				<th field="fcbmy" width="40" align="center"  data-options="
					styler: function(value,row,index){
						if (value > 0){
							return 'color:red;';							
						}
					}
				">非常不满意</th>
				<th field="myl" width="40" align="center" data-options="
					styler: function(value,row,index){
						if (value){
							if( value <= 70)
							return 'color:red;';
							else
							return 'color:green;';							
						}else
						return 'color:red;';
					},formatter: function(value,row,index){
						if (value){
							var _value = parseInt(value)
							if(value > 0){								
								return   _value.toFixed(2) +'%';							
							}
						}else{
							if(row.inpatient_out_num && row.inpatient_out_num>0){
								return '0.00%';
							}else{
								return '100%';
							}
						}
					}					
				">满意率</th>	
				
				<th field="evlpercent" width="40" align="center" data-options="
					styler: function(value,row,index){
						if (value){
							if(value > 70 && value <=100){							
								return 'color:green;';	
							}else{								
								return 'color:red';											
							}		
						}else
							return 'color:red;';
					},formatter: function(value,row,index){
						if (value){
							if( value >= 0){
							
								var _value = parseInt(value)
								if(value <=100){
									return   _value.toFixed(2) +'%';
								}else{								
									return '评价滞后';									
								}
							}						
						}else
							return '0%';
					}
					
				">评价率</th>										
			</tr>                         
		</thead>
		
	</table>
	</div>
	
	<div class="easyui-panel details-panel" data-options="closed:true,openAnimation:'slide',closeAnimation:'slide'">
	  	   
		<div>						
			<a href="javascript:void(0);" class="easyui-linkbutton function-btn l-btn l-btn-small l-btn-plain" iconcls="icon-undo" plain="true">返回</a>
		</div>
		<div class="well well-small" style="margin-left: 5px;margin-top: 5px">		
			<p>				
				 <strong><font color="red">非常满意5分,满意4分,一般3分,不满意2分,非常不满意1分 </font></strong>
			</p>
		</div>
		<table class="easyui-datagrid dg-list"  
			data-options="rownumbers:true,
			animate: true,							
			striped:true,
			border:true,
			//singleSelect:false,
			idField: 'id',					
			fitColumns: true,
			checkOnSelect:true,
			selectOnCheck:true,
			width : 'auto'">
			
			<thead>						
				<tr>				
					<th field="patient_no" width="60" align="center">住院号</th>
				<th field="patient_name" width="40" align="center">患者姓名</th>
				<th field="1" width="40" align="center">1</th>
				<th field="2" width="40" align="center" >2</th>
				<th field="3" width="40" align="center" >3</th>
				<th field="4" width="40" align="center" >4</th>				
				<th field="5" width="40" align="center">5</th>		
				<th field="6" width="40" align="center" >6</th>	
				<th field="7" width="40" align="center">7</th>
				<th field="8" width="40" align="center" >8</th>
				<th field="9" width="40" align="center" >9</th>
				<th field="10" width="40" align="center" >10</th>				
				<th field="11" width="40" align="center">11</th>		
				<th field="12" width="40" align="center" >12</th>
				<th field="score_count" width="40" align="center" data-options="
					styler: function(value,row,index){
						var standard
						if(row &&　row.score_standard){
							standard = row.score_standard
						}else{
							standard = 60
						}
						if (value){
							if(value < standard){
								return 'color:red;';							
							}else{
								return 'color:green;';
							}
						}else{
							return 'color:green;';
						}
					}
				">合计</th>
				<th field="score_standard" width="40" align="center" >满分</th>										
				</tr>                    
			</thead>		
		</table>	
	</div>	
</div> 
<script>
requirejs(['popListPage','inpatientDeptInfo','domReady!'],function(flowedit,inpatientDept,doc){
	flowedit.init({doc:doc,
		rootId:'panel-satisfaction-inpatient-dept-pop',				
		subSystemCode:'satisfaction',
		moduleCode:'inpatientDeptInfo',
		queryModule:'satisEvaluate',		
		rowClick:inpatientDept.clickBizRow,		
		queryMethod:'getInpatientDeptDomain'
	});
});	
</script>

